'''
Created on May 30, 2012

@author: mupet
'''
from syslogd.status.ServiceController import ServiceController

class GeneralTabListener(object):
    '''
    classdocs
    '''

    def __init__(self):
        '''
        Constructor
        '''
        
    def setStatusLabelText(self, text):
        self.statusLabel.SetLabel(text)
        
        
    def setStatusLabel(self, label):
        self.statusLabel=label
        
    def start(self, event):
        ServiceController.sudoStartSyslogd()
        self.setStatusLabelText('Running')
        
    def stop(self, event):
        ServiceController.sudoStopSyslogd()
        self.setStatusLabelText('Stopped')
        
    def restart(self, event):
        ServiceController.sudoRestartSyslogd()
        self.setStatusLabelText('Running')